/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package embuzzled.g0;

import embuzzled.ui.Grid;
import embuzzled.ui.GridSolution;
import embuzzled.ui.Player;
import java.awt.Color;

/**
 *
 * @author Satyajeet
 */
public class DumbPlayer implements Player{

    public GridSolution move(Grid grid) {
        //throw new UnsupportedOperationException("Not supported yet.");
        int rows = grid.rows;
        int cols = grid.cols;
        int no_of_puz = 2;
        String SolutionKey = "This is a test solution";
        GridSolution DumbSolution = new GridSolution(rows, cols, no_of_puz,SolutionKey);

        for(int loopr=0;loopr<rows;loopr++)
        {
            for(int loopc=0;loopc<cols;loopc++)
            {
                Color tempc = null;
                if((loopr+loopc)%2 == 0)
                {
                    tempc = new Color(255,0,0);
                }
                else
                {
                    tempc = new Color(0,255,0);
                }
                DumbSolution.GridColors[loopr][loopc] = tempc;

            }

        }
       
        //System.out.println("I was called");
        return DumbSolution;

    }
    

}
